import { createStore } from 'vuex'

export default createStore({
  state: {
    token: '',
    mail: '',
    avatar: '',
    nickName: '',
  },
  mutations: {
    setToken(state, token) {
      return (state.token = token)
    },
    setMail(state, mail) {
      return (state.mail = mail)
    },
    setAvatar(state, avatar){
      return state.avatar = avatar
    },
    setNickName(state , nickName){
      return state.nickName = nickName
    }
  },
})
